package com.camin.android;

import com.camin.android.db.DataHelper;

import android.app.Activity;
import android.database.sqlite.SQLiteDatabase;

public class BaseActivity extends Activity {
	private DataHelper dataHelper;
	private SQLiteDatabase database;

	
	public DataHelper getDataHelper() {
		if (dataHelper == null)	{
			dataHelper = new DataHelper(getApplicationContext());
		}
		return dataHelper;
	}

	public void setDataHelper(DataHelper dataHelper) {
		this.dataHelper = dataHelper;
	}

	public SQLiteDatabase getDatabase() {
		if (database == null)	{
			database = getDataHelper().getReadableDatabase();
		}
		return database;
	}

	public void setDatabase(SQLiteDatabase database) {
		this.database = database;
	}
	
	
		
}
